﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PACKETPARSERMAX20.CORE;

namespace PACKETPARSERMAX20.CORE.DEFINITIONS
{

    public class SMSG_RAID_INSTANCE_MESSAGE_DEF : DefinitionBase
    {
        public override bool Process()
        {
            ResetPosition();
            var type = ReadUInt32();//data << uint32(type);
            var mapid = ReadUInt32();//data << uint32(mapid);
            if (ClientBuild > 9551)
            {
                var difficulty = ReadUInt32(); //data << uint32(difficulty);                             // difficulty
            }

            var time = ReadUInt32();// data << uint32(time);

            if (ClientBuild > 9551)
            {
                if (type == 4)
                {
                    var your = ReadByte();// data << uint8(0);                                   // is your (1)
                    var extended = ReadByte();// data << uint8(0);                                   // is extended (1), ignored if prev field is 0
                }
            }

            var map = PACKETPARSERMAX20.CORE.SQL.CUSTOM.DBCMap.GetMapById((int)mapid);
            Result = map.id + "\t" + map.name + "\t" + map.name_internal + "\t";



            return Validate();
        }
    }

    public class SMSG_INSTANCE_SAVE_CREATED_DEF : DefinitionBase
    {
        public override bool Process()
        {
            ResetPosition();
            var unk = ReadUInt32("unk");
            return Validate();
        }
    }

    public class CMSG_COMMENTATOR_ENTER_INSTANCE_DEF : DefinitionBase
    {
        public override bool Process()
        {
            ResetPosition();
            return Validate();
        }
    }


}
